package com.gopay.common.domain.bank;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Version;

import com.gopay.common.domain.BaseEntity;
/** 
 * 认证主订单
 * @ClassName: BankAuthOrder  
 * @author w_jiqing 
 */ 
@Entity
@Table(name = "BIS_BANK_AUTH_ORDER")
public class BankAuthOrder extends BaseEntity{
    

    private static final long serialVersionUID = -4230630009163274816L;

    /**
     * 序列号
     */
    @Id
    @SequenceGenerator(name="BIS_BANK_AUTH_ORDER_SEQ", sequenceName="BIS_BANK_AUTH_ORDER_SEQ" )
    @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="BIS_BANK_AUTH_ORDER_SEQ")
    @Column(name="SQ")
    private int sq;
    
    /**
     * 国付宝系统订单号（系统内唯一订单标识）
     */
    @Column(name = "GOPAY_ORDER_ID")
    private String orderId;   
    /**
     * 银行订单号
     */    
    @Column(name = "GOPAY_OUT_ORDER_ID")
    private String outOrderId;
    /**
     * 银行代码
     */
    @Column(name = "GOPAY_BANK_CODE")
    private String bankCode;
    
    /**
     * 银行业务产品代码BANK_BIZ_PROD_CODE
     */
    @Column(name = "BANK_BIZ_PROD_CODE")
    private String bankBizProdCode;

    /**
     * 接口通道代码 00 - 直连银行
     */
    @Column(name = "INTRFACE_CHANNEL_CODE")
    private String interfaceChennelCode;
    
    /**
     * 订单类型
     * 00国付宝新平台订单 
     * 01国付宝旧平台订单
	 * 02三方平台国付宝通道订单
	 * 03三方平台独立通道订单
     */
    @Column(name = "ORDER_TYPE")
    private String orderType;
    
    /**
     * 认证状态
     * 00- 进行中
     * 02- 认证通过
     * 03- 自动对单认证通过
     * 04- 手工对账认证通过
     * 91- 认证不通过
     * 92- 认证失败
     * 93- 自动对账认证不通过
     * 94- 手工对账认证不通过
     */
    @Column(name = "ORDER_STATUS")
    private String orderStatus;
    
    
    /**
     * 对单次数总计
     */
    @Column(name="TOTAL_CHECK_TIMES")
    private Integer totalCheckTimes;
    
    /**
     * 乐观锁版本号
     */
    @Version
    @Column(name="VERSION")
    private Integer version;
    
    /**
     * 是否锁定
     * 
     * 1 - 是 0 - 否
     */
    @Column(name = "IS_LOCK", nullable = false, precision = 1, scale = 0)
    private int lock;
    
    /**
     * 创建时间
     */
    @Column(name="CREATED_TS")
    private Date createdTs;
    
    /**
     * 记录最后修改时间
     */
    @Column(name="LAST_UPD_TS")
    private Date lastUpdTs;
    
    /**
	 * 发往银行时间
	 */
	@Column(name = "SEND_BANK_TM")
	private java.util.Date sendBankTm;

	
	
    public int getSq() {
        return sq;
    }

    public void setSq(int sq) {
        this.sq = sq;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getOutOrderId() {
        return outOrderId;
    }

    public void setOutOrderId(String outOrderId) {
        this.outOrderId = outOrderId;
    }

    public String getBankCode() {
        return bankCode;
    }

    public void setBankCode(String bankCode) {
        this.bankCode = bankCode;
    }

    public String getBankBizProdCode() {
        return bankBizProdCode;
    }

    public void setBankBizProdCode(String bankBizProdCode) {
        this.bankBizProdCode = bankBizProdCode;
    }

    public String getInterfaceChennelCode() {
        return interfaceChennelCode;
    }

    public void setInterfaceChennelCode(String interfaceChennelCode) {
        this.interfaceChennelCode = interfaceChennelCode;
    }

    public String getOrderType() {
		return orderType;
	}

	public void setOrderType(String orderType) {
		this.orderType = orderType;
	}

	public String getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(String orderStatus) {
        this.orderStatus = orderStatus;
    }

    public Integer getTotalCheckTimes() {
        return totalCheckTimes;
    }

    public void setTotalCheckTimes(Integer totalCheckTimes) {
        this.totalCheckTimes = totalCheckTimes;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public int getLock() {
        return lock;
    }

    public void setLock(int lock) {
        this.lock = lock;
    }

    public Date getCreatedTs() {
        return createdTs;
    }

    public void setCreatedTs(Date createdTs) {
        this.createdTs = createdTs;
    }

    public Date getLastUpdTs() {
        return lastUpdTs;
    }

    public void setLastUpdTs(Date lastUpdTs) {
        this.lastUpdTs = lastUpdTs;
    }
    
	public java.util.Date getSendBankTm() {
		return sendBankTm;
	}

	public void setSendBankTm(java.util.Date sendBankTm) {
		this.sendBankTm = sendBankTm;
	}

    
}
